#include "pm_flow_impl.hpp"
#include "api/pm_trigger.hpp"

/*---------------------------------------------------------------------------*/

namespace ProjectManager {

/*---------------------------------------------------------------------------*/


FlowImpl::FlowImpl( const std::string& _name )
	:	m_name( _name )
{
}


/*---------------------------------------------------------------------------*/


FlowImpl::~FlowImpl()
{
}


/*---------------------------------------------------------------------------*/


const std::string&
FlowImpl::getName() const
{
	return m_name;
}


/*---------------------------------------------------------------------------*/


void
FlowImpl::setName( const std::string& _name )
{
	m_name = _name;
}


/*---------------------------------------------------------------------------*/


void
FlowImpl::addTrigger( const Trigger& _trigger )
{
	m_triggers.push_back( &_trigger );
}


/*---------------------------------------------------------------------------*/


int
FlowImpl::getTriggersCount() const
{
	return m_triggers.size();
}


/*---------------------------------------------------------------------------*/


const Trigger&
FlowImpl::getTrigger( int _idx ) const
{
	return *m_triggers.at( _idx );
}


/*---------------------------------------------------------------------------*/

} // namespace ProjectManager
